import requests
import config
class Top_up_api:

    def __init__(self):
        self.get_verifycode_url = config.BASE_URL + '/common/public/verifycode/{}'
        self.get_tupup_url = config.BASE_URL + '/trust/trust/recharge'

    # 获取充值验证码
    def get_verifycode(self, session, r):
        return session.get(url=self.get_verifycode_url.format(r))

    # 充值
    def tup_up(self, session, data_dict):
        return session.post(url=self.get_tupup_url, data=data_dict)



